import { fetch, query } from './api'
// 登录
let _signin = (name, password) => {
  return fetch(
    '/user.ashx',
    {
      username: name,
      password,
      work: 'login'
    }
  )
}
// 改密码
let _modify = (id, old, newv) => {
  return fetch(
    '/user.ashx',
    {
      MemberID: id,
      OldPwd: old,
      NewPwd: newv,
      work: 'updatapwd'
    }
  )
}
// 通过id获取会员信息
let _getUserInfo = id => {
  return fetch(
    '/user.ashx',
    {
      MemberID: id,
      work: 'getmemberinfo'
    }
  )
}
// 获取题库提示
let _getTips = id => {
  return fetch(
    '/user.ashx',
    {
      MemberID: id,
      work: 'showbox'
    }
  )
}
export {
  _signin,
  _modify,
  _getUserInfo,
  _getTips
}